package teste.dao;

import org.hibernate.Session;

import teste.Categoria;
import teste.HibernateUtil;

public class CategoriaDAO {

	private Session session;
	
	public void salvar(Categoria ct){
		session = HibernateUtil.getSessionFactory().openSession();
		session.beginTransaction();
		session.save(ct);
		session.getTransaction().commit();
	}
}
